package com.binary.coder.gift.core.domain.invitation.impI;

import cn.hutool.core.bean.BeanUtil;
import com.binary.coder.gift.core.domain.invitation.AppInvitationService;
import com.binary.coder.gift.core.domain.invitation.model.entity.AppInvitationCardEntity;
import com.binary.coder.gift.core.domain.invitation.repository.AppInvitationRepository;
import com.binary.coder.gift.core.infrastructure.po.invitation.AppInvitationCard;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author atao
 * @version 1.0.0
 * @ClassName AppInvitationServiceImpI.java
 * @Description AppInvitationService
 * @createTime 2025年02月05日 19:53:00
 */
@Service
public class AppInvitationServiceImpI implements AppInvitationService {

    @Resource
    private AppInvitationRepository appInvitationRepository;

    @Override
    public void saveAppInvitation(AppInvitationCardEntity appInvitationCardEntity) {
        AppInvitationCard appInvitationCard = BeanUtil.copyProperties(appInvitationCardEntity,AppInvitationCard.class);
        appInvitationRepository.saveAppInvitation(appInvitationCard);
    }
}
